import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes: Array<RouteRecordRaw> = [
  //初始化项目: 配置好登录路由
  {
    path:'/login',
    name:'login',
    component : () => import('../views/login/index.vue')
  },
  //首页路由
  {
    path: '/home',
    name: 'home',

    component: () => import('../views/HomeView/index.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
